package com.hc.bean;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class OrderInfo implements Serializable {
    private Integer id;
    private Integer uid;
    private String status;

    /*解决 数据库datetime 与 前端传递 string 冲突 */
    @DateTimeFormat(pattern="yyyy-MM-dd")   ////页面写入数据库时格式化
//    @JSONField(format="yyyy-MM-dd")//数据库导出页面时json格式化
    private Date ordertime;
    private Double orderprice;

    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date orderTimeFrom;
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date orderTimeTo;

    private UserInfo userInfo;
    private List<OrderDetail> orderDetailList;
}
